<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>stapes例子13</title>
    <script type="text/javascript" src="../lib/stapes-0.8.1/stapes.js"></script>
    <script type="text/javascript" src="../lib/jquery-easyui-1.4.2/jquery.min.js"></script>
</head>
<body>
<h1>你好!!!</h1>

<div id="app">11111</div>


<script type="text/javascript">
    var Module = Stapes.subclass({
        "sleep" : function() {
            this.emit('sleeping', 'very deep');
        }
    });

    var module = new Module();

    module.on('sleeping', function(how) {
        console.log("i'm sleeping " + how);
    });

    module.sleep(); // "i'm sleeping very deep"
</script>


</body>
</html>